|
Server : LiteSpeed System : Linux host 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : idnco5810 ( 1093) PHP Version : 8.2.29 Disable Function : NONE Directory : /usr/local/CyberPanel/lib/python3.10/site-packages/MySQLdb/__pycache__/ |
Upload File : |
o
��g�? � @ s� d Z ddlZddlmZ e�d�g d��ejejB �ZG dd� d�Z G d d
� d
�Z
G dd� d�ZG d
d� d�ZG dd� d�Z
G dd� de
ee �ZG dd� de
e
e �ZG dd� deee �ZG dd� dee
e �ZdS )zyMySQLdb Cursors
This module implements Cursors of various types for MySQLdb. By
default, MySQLdb uses the Cursor class.
� N� )�ProgrammingError� )z'\s*((?:INSERT|REPLACE)\b.+\bVALUES?\s*)z6(\(\s*(?:%s|%\(.+\)s)\s*(?:,\s*(?:%s|%\(.+\)s)\s*)*\))z(\s*(?:ON DUPLICATE.*)?);?\s*\Zc @ s& e Zd ZdZdZddlmZmZmZm Z m
Z
mZmZm
Z
mZmZmZ dZdd� Zdd � Zd
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd1dd�Zd1d d!�Zd1d"d#�Z d$d%� Z!d&d'� Z"d2d)d*�Z#d+d,� Z$d3d-d.�Z%d/d0� Z&eZeZe Z e
Z
eZeZe
Z
eZeZeZdS )4�
BaseCursora A base for Cursor classes. Useful attributes:
description
A tuple of DB API 7-tuples describing the columns in
the last executed query; see PEP-249 for details.
description_flags
Tuple of column flags for last query, one entry per column
in the result set. Values correspond to those in
MySQLdb.constants.FLAG. See MySQL documentation (C API)
for more information. Non-standard extension.
arraysize
default number of rows fetchmany() will fetch
i r )�
MySQLError�Warning�Error�InterfaceError�
DatabaseError� DataError�OperationalError�IntegrityError�
InternalErrorr �NotSupportedErrorNc C s@ || _ d | _d | _d| _d| _d | _d | _d | _d | _d | _ d S )Nr r )
�
connection�description�description_flags�rowcount� arraysize� _executed� lastrowid�_result� rownumber�_rows)�selfr � r �E/usr/local/CyberPanel/lib/python3.10/site-packages/MySQLdb/cursors.py�__init__A s
zBaseCursor.__init__c C sh d | _ d | _d | _d | _| jr| j�� d | _| j}|d u r d S |�� dkr2|�� |�� dks&d S d S �Nr ) r r r r r �discardr �next_result�discard_result�r �conr r r �_discardN s
�zBaseCursor._discardc C sF z| j du rW d| _ d| _dS | �� W d| _ d| _dS d| _ d| _w )z6Close the cursor. No further queries will be possible.N)r r r$ �r r r r �closeb s
�
�zBaseCursor.closec C � | S �Nr r% r r r � __enter__l � zBaseCursor.__enter__c G s ~| � � d S r( )r&